package edu.wong.attendance_management_api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serializable;
import java.time.ZonedDateTime;
import java.util.Date;

/**
 * <p>
 *
 * </p>
 *
 * 员工
 *
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@TableName("t_check")
public class Check implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 请假员工ID
     */
    private Integer userId;

    /**
     * 请假的部门ID
     */
    private Integer groupId;

    /**
     * 开始请假时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startDate;

    /**
     * 结束请假时间
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date endDate;
    /**
     * 类型
     */
    private String type;

    /**
     * 请假状态：0请假 1迟到 3旷工
     */
    private Integer status;

    /**
     * 是否批假0待审核，1批准，-1拒绝
     */
    private Integer yorn;

    /**
     * 描述
     */
    private String description;
}
